package com.ruoyi.cpsp.mapper;
/*
    @author neu.xiangwenjuan
    @create 2023/3/14
*/

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.cpsp.domain.CurrentPerformanceData;
import com.ruoyi.cpsp.domain.CurrentPerformanceDataEn;
import com.ruoyi.cpsp.domain.CurrentPerformanceTotal;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CurrentPerformanceDataMapper extends BaseMapper<CurrentPerformanceData> {

    List<CurrentPerformanceData> getAllInfo(@Param("state") Integer state);

    List<CurrentPerformanceDataEn> selectAll();

    List<CurrentPerformanceDataEn> selectDataByIdCard(@Param("idCardList")List<String> idCardList);

    int updateByPrimaryKeySelective(CurrentPerformanceData record);

    List<CurrentPerformanceDataEn> selectSelective(@Param("department")String department, @Param("teamGroup")Integer teamGroup, @Param("employeeInfo") String employeeInfo);

    CurrentPerformanceTotal selectDataTotal(@Param("departmentId") String departmentId, @Param("teamGroupId")Integer teamGroupId);

    double selectSum(@Param("year")Integer year,
                     @Param("quarter")Integer quarter);

    double selectSumDepart(@Param("idCardList")List<String> idCardList,
                           @Param("year")Integer year,
                           @Param("quarter")Integer quarter);

    int selectCountByQuarter(@Param("year")Integer year,
                             @Param("quarter")Integer quarter);

    CurrentPerformanceData selectDataByEmployee(@Param("year")Integer year,
                                                  @Param("quarter")Integer quarter,
                                                  @Param("employeeIdCard") String employeeIdCard);

    CurrentPerformanceData selectDataByEmployeeCard(@Param("employeeIdCard") String employeeIdCard);

    CurrentPerformanceData selectFirst();

    int deleteCurrentPerformanceData();

    int updateCurrentAnnotation(@Param("idCardList") List<String> idCardList);

    CurrentPerformanceData selectYear();

    int deleteCurrentByCard(@Param("employee_idCard") String employee_idCard);
}
